package com.chima.service.impl;

import java.util.List;

import com.chima.dao.ResourceDao;
import com.chima.domain.Resource;
import com.chima.service.ResourceService;

public class ResourceServiceImp implements ResourceService {
	private ResourceDao resourceDao;
	

	public ResourceDao getResourceDao() {
		return resourceDao;
	}


	public void setResourceDao(ResourceDao resourceDao) {
		this.resourceDao = resourceDao;
	}


	public List<Resource> resourcesfindbyroseid(int id) {
		
		return resourceDao.resourcesfindbyroseid(id);
	}


	public List<Resource> resourcesfindreResources(int pid) {
		return resourceDao.resourcesfindreResources(pid);
	}


	public Resource findidbyname(String string) {
		return resourceDao.findidbyname(string);
	}


	public void deleteresource(int id,Resource resource) {
		int rsid=resource.getId();
		resourceDao.deleteresource(id,rsid);
	}


	public List<Resource> ListAllResource() {
		
		return 	resourceDao.ListALL();
	}


	public List<Resource> findreResourcesByPid(int pid) {
	
		return resourceDao.resourcesfindreResources(pid);
	}


	public Resource resourcesfindbyId(int id) {
		return resourceDao.findbyId(id);
	}

}
